import service from '@/utils/request'
// @Tags ShippingTemplate
// @Summary 创建运费模板
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.ShippingTemplate true "创建运费模板"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /shippingTemplate/createShippingTemplate [post]
export const createShippingTemplate = (data) => {
  return service({
    url: '/shippingTemplate/createShippingTemplate',
    method: 'post',
    data
  })
}

// @Tags ShippingTemplate
// @Summary 删除运费模板
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.ShippingTemplate true "删除运费模板"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /shippingTemplate/deleteShippingTemplate [delete]
export const deleteShippingTemplate = (params) => {
  return service({
    url: '/shippingTemplate/deleteShippingTemplate',
    method: 'delete',
    params
  })
}

// @Tags ShippingTemplate
// @Summary 批量删除运费模板
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除运费模板"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /shippingTemplate/deleteShippingTemplate [delete]
export const deleteShippingTemplateByIds = (params) => {
  return service({
    url: '/shippingTemplate/deleteShippingTemplateByIds',
    method: 'delete',
    params
  })
}

// @Tags ShippingTemplate
// @Summary 更新运费模板
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.ShippingTemplate true "更新运费模板"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /shippingTemplate/updateShippingTemplate [put]
export const updateShippingTemplate = (data) => {
  return service({
    url: '/shippingTemplate/updateShippingTemplate',
    method: 'put',
    data
  })
}

// @Tags ShippingTemplate
// @Summary 用id查询运费模板
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.ShippingTemplate true "用id查询运费模板"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /shippingTemplate/findShippingTemplate [get]
export const findShippingTemplate = (params) => {
  return service({
    url: '/shippingTemplate/findShippingTemplate',
    method: 'get',
    params
  })
}

// @Tags ShippingTemplate
// @Summary 分页获取运费模板列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取运费模板列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /shippingTemplate/getShippingTemplateList [get]
export const getShippingTemplateList = (params) => {
  return service({
    url: '/shippingTemplate/getShippingTemplateList',
    method: 'get',
    params
  })
}
// @Tags ShippingTemplate
// @Summary 不需要鉴权的运费模板接口
// @Accept application/json
// @Produce application/json
// @Param data query request.ShippingTemplateSearch true "分页获取运费模板列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /shippingTemplate/getShippingTemplatePublic [get]
export const getShippingTemplatePublic = () => {
  return service({
    url: '/shippingTemplate/getShippingTemplatePublic',
    method: 'get',
  })
}
